package com.hu.controller;

import com.hu.entity.ShowContent;
import com.hu.entity.ToUniversity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

/**
 * @author ZhouKai
 * 2022/4/23 10:54
 */
@Controller
public class PageController {

    @RequestMapping("/")
    public String login() {
        return "/login";
    }

    @RequestMapping("/index")
    public String toIndex() {
        return "/index";
    }

    @RequestMapping("/toUniversity")
    public ModelAndView toUniversity(String schoolName) {
        ModelAndView mv = new ModelAndView();
        mv.setViewName("university");
        mv.addObject("name", schoolName);
        return mv;
    }

    @RequestMapping("/toSchoolLife")
    public String toSchoolLifeCSUFT() {
        return "/CSUFT_schoolLife";
    }

    @RequestMapping("/toSchoolSurvey")
    public String toSchoolSurveyCSUFT() {
        return "/CSUFT_schoolSurvey";
    }

    @RequestMapping("/toSchoolCulture")
    public String toSchoolCultureCSUFT() {
        return "/CSUFT_schoolCulture";
    }

    @RequestMapping("/toCanteen")
    public String toCanteen() {
        return "/canteen";
    }

    @RequestMapping("/toTraffic")
    public String toTraffic() {
        return "/traffic";
    }

    @RequestMapping("/toMedical")
    public String toMedical() {
        return "/medical";
    }
}
